Save Image
AutomatR.Web.SaveImage
The "Save Image" activity in AutomatR facilitates saving an image to a specified location on your local drive. This activity is useful for capturing and persisting images obtained during UI automation workflows.
Properties
Name | Description |
---|---|
Input | |
File Path | Specifies the complete file path, including the location and file name, where the image should be saved on the local drive. Ensure to provide a valid string containing the desired folder location and file name (e.g., "D:\test\image.png"). |
Image | Specifies the image variable containing the image data to be saved. Ensure to provide a valid image variable obtained from other activities. |
Misc | |
Display Name | Provides a customizable name for the activity displayed in the workflow. String variables containing the desired display name. |
Optional | |
Delay | Specifies the amount of time (in seconds) to wait before executing the "Save Image" activity. This can be useful for handling synchronization issues or waiting for specific conditions before saving the image. Integer variables containing the delay duration. Ex.: If the amount of time is 1000 milliseconds or 1 sec, i.e. 1. |
The "Save Image" activity does not provide direct output. Check the specified file path for the saved image on your local drive or use additional activities as needed.
How to use:
- Drag and drop the "Save Image" activity onto the workflow.
- Configure the properties by specifying the file path and providing the image variable obtained from other activities.
- Optionally, configure the delay to wait for a specific duration before saving the image.
- Execute the workflow to save the specified image to the local drive.
Example: Consider an example where the "Save Image" activity is used to save a captured screenshot to a specific folder:
Save Image:
File Path: "D:\\Screenshots\\captured_image.png"
Image: capturedScreenshot
Delay: 2 (seconds)
In this example, the activity saves the image variable "capturedScreenshot" to the specified file path, "D:\Screenshots\captured_image.png". The delay of 2 seconds allows time for any required conditions to be met before saving the image.